# Contributor: Breno Leitao <breno.leitao@gmail.com>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=ed
pkgver=1.19
pkgrel=1
pkgdesc="Line-oriented text editor used to create, display, modify and otherwise manipulate text files"
url="https://www.gnu.org/software/ed/"
arch="all"
license="GPL-2.0-or-later"
subpackages="$pkgname-doc"
source="https://ftp.gnu.org/gnu/ed/ed-$pkgver.tar.lz"

build() {
	# bindir needs correspond with busybox location
	./configure CC="${CC:-cc}" CFLAGS+="$CFLAGS" LDFLAGS="$LDFLAGS" \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--bindir=/bin \
		--mandir=/usr/share/man
	make all
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
594d5cf895931783110ee1956078f6a77aee022fb67730cbc6f1d30521c120b97820a5eb349278575f85c4c1e17fea0e16a3bc22592edae53c6fd27941ee3d7e  ed-1.19.tar.lz
"
